package com.ruoyi.system.recovery.service.impl;

import java.util.List;
import java.util.Arrays;

import lombok.extern.slf4j.Slf4j;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.ruoyi.system.recovery.mapper.RecoveryDetailMapper;
import com.ruoyi.system.recovery.domain.RecoveryDetail;
import com.ruoyi.system.recovery.service.IRecoveryDetailService;

/**
 * 回收账号详情Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-04
 */
@Slf4j
@Service
public class RecoveryDetailServiceImpl extends ServiceImpl<RecoveryDetailMapper, RecoveryDetail> implements IRecoveryDetailService {

    /**
     * 查询回收账号详情
     *
     * @param recoveryInfoId 回收账号详情主键
     * @return 回收账号详情
     */
    @Override
    public RecoveryDetail selectRecoveryDetailByRecoveryInfoId(Long recoveryInfoId) {
        return super.getById(recoveryInfoId);
    }

    /**
     * 查询回收账号详情列表
     *
     * @param recoveryDetail 回收账号详情
     * @return 回收账号详情
     */
    @Override
    public List<RecoveryDetail> selectRecoveryDetailList(RecoveryDetail recoveryDetail) {
        return baseMapper.selectRecoveryDetailList(recoveryDetail);
    }

    /**
     * 新增回收账号详情
     *
     * @param recoveryDetail 回收账号详情
     * @return 结果
     */
    @Override
    public boolean insertRecoveryDetail(RecoveryDetail recoveryDetail) {
        return super.save(recoveryDetail);
    }

    /**
     * 修改回收账号详情
     *
     * @param recoveryDetail 回收账号详情
     * @return 结果
     */
    @Override
    public boolean updateRecoveryDetail(RecoveryDetail recoveryDetail) {
        return super.updateById(recoveryDetail);
    }

    /**
     * 批量删除回收账号详情
     *
     * @param recoveryInfoIds 需要删除的回收账号详情主键
     * @return 结果
     */
    @Override
    public boolean deleteRecoveryDetailByRecoveryInfoIds(Long[] recoveryInfoIds) {
        return super.removeByIds(Arrays.asList(recoveryInfoIds));
    }

    /**
     * 删除回收账号详情信息
     *
     * @param recoveryInfoId 回收账号详情主键
     * @return 结果
     */
    @Override
    public boolean deleteRecoveryDetailByRecoveryInfoId(Long recoveryInfoId) {
        return super.removeById(recoveryInfoId);
    }

}
